package com.youle.youleservice.http;

import com.youle.youleservice.manager.OkhttpManager;

import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;

/**
 * Created by Administrator on 2018/8/12.
 */

public class HttpRequest {

    private static  OkHttpClient mClient = new OkHttpClient();

    public void post(String url, RequestBody body, Callback callback){
        Request.Builder builder = new Request.Builder();
        builder.url(url);
        builder.post(body);
        Request request=builder.build();
        mClient.newCall(request).enqueue(callback);
    }

}
